// 用户地址模型
const { Address } = require('../../../models/address');
// 统一数据返回类
const { DataReturn } = require('../../../common/returnclass');

module.exports = async (req, res) => {
	let { user_id } = req.query;
	console.log(req.query);
	
	let address = await Address.find({ user_id });
	if (!address) return DataReturn.getData(res,200,[],'暂无数据');
	
	DataReturn.getData(res,200,address,'获取地址成功')

}
